
import QtQuick.Shapes 1.14
import QtGraphicalEffects 1.14
import QtQuick.Extras 1.4
import Qt.labs.platform 1.1
import QtQuick.Controls 2.15
import QtQuick 2.15
import QtQuick.Layouts 1.14

Item {
    id:root
    implicitHeight:600
    implicitWidth: 800

    signal usbClicked()
    signal wifiClicked()

    Rectangle{
        width: 800
        height: 500
        anchors.leftMargin: 0
        color: "transparent"

        ColumnLayout{
            spacing: 1
            anchors.fill: parent
            Rectangle{
                width:  750
                height:  70
                color: "transparent"
            }

            Label{
                Layout.alignment: Qt.AlignBottom
                text: qsTr("Open File")
                font{
                    family: "Microsoft YaHei"
                    pixelSize: 20
                    bold: true
                }
                color: "#fff"
            }


            Rectangle{
                height: 1
                width:  750
                color:"#24CFC5"

            }

            Rectangle{
                height: 490
                width:  600
                color:"transparent"
                Layout.alignment: Qt.AlignHCenter
                RowLayout {
                    spacing: 65
                    anchors.fill: parent
                    //usb
                    Rectangle{
                        color:"transparent"
                        width: 266
                        height: 285
                        Image {
                            id: bac_usb
                            source: "qrc:/img/usb.png"
                            anchors.fill: parent
                        }

                        Label{
                            anchors.horizontalCenter: parent.horizontalCenter
                            anchors.bottom: parent.bottom
                            anchors.bottomMargin: 50
                            text: qsTr("USB")
                            font{
                                family: "Microsoft YaHei"
                                pixelSize: 24
                                bold: true
                            }
                            color: "#fff"
                        }

                        MouseArea{
                            anchors.fill: parent
                            onPressed: {
                                bac_usb.source="qrc:/img/usb1.png"
                            }
                            onReleased: {
                                bac_usb.source="qrc:/img/usb.png"
                                root.usbClicked()
                            }

                        }

                    }

                    //wifi
                    Rectangle{
                        color:"transparent"
                        width: 266
                        height: 285
                        Image {
                            id: bac_wifi
                            source: "qrc:/img/wifi.png"
                            anchors.fill: parent
                        }

                        Label{
                            anchors.horizontalCenter: parent.horizontalCenter
                            anchors.bottom: parent.bottom
                            anchors.bottomMargin: 50
                            text: qsTr("WIFI")
                            font{
                                family: "Microsoft YaHei"
                                pixelSize: 24
                                bold: true
                            }
                            color: "#fff"
                        }

                        MouseArea{
                            anchors.fill: parent
                            onPressed: {
                                bac_wifi.source="qrc:/img/wifi1.png"
                            }
                            onReleased: {
                                bac_wifi.source="qrc:/img/wifi.png"
                                root.wifiClicked()
                            }
                        }

                    }
                }

            }
        }
    }
}

